package P817;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * Problema da disciplina de Estrutura de Dados e Complexidade de Algoritmos da
 * Pos Graduacao do Periodo 2011.1
 *
 * @see http://br.spoj.pl/problems/DOBRA/
 * @author Elenilson Vieira - 111100371 - elenilson[at]elenilsonvieira.com
 * @since 1 de maio de 2011
 */
public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

        int i = 1;
        while(true){
            int folds = Integer.parseInt(reader.readLine());

            if(folds == -1)
                break;

            int amount = (int) Math.pow(Math.pow(2, folds) + 1, 2);
            System.out.println(String.format("Teste %d\n%d\n", i++, amount));
        }
    }

}
